<form action="<? echo $_SERVER['PHP_SELF'] ?>" method="post">
<table border=0 align=center>
<tr><th colspan=2>General</th></tr>
<tr><td>
First Name
</td><td>
<input type="text" name="firstname" value="<? echo stripslashes($user->firstname) ?>">
</td></tr>
<tr><td>
Last Name
</td><td>
<input type="text" name="lastname" value="<? echo stripslashes($user->lastname) ?>">
</td></tr>
<tr><td>
Username
</td><td>
<input type="hidden" name="action" value="edituser">
<input type="hidden" name="uid" value="<? echo $user->id ?>">
<input type="text" name="username" value="<? echo stripslashes($user->username) ?>">
</td></tr>
<tr><td colspan="2"><input type="submit" value="Change Information"></td></tr>
</form>
<tr><td colspan="2" style="border-bottom: 1px solid #000000;">&nbsp;</td></tr>
<form action="<? echo $_SERVER['PHP_SELF'] ?>" method="post">
<tr><th colspan=2>Administrative</th></tr>
<tr><td>
<input type="text" name="newpassword">
</td><td>
<input type="hidden" name="action" value="changepassword">
<input type="hidden" name="uid" value="<? echo $user->id ?>">
<input type="submit" value="Change Password">
</form>
</td></tr>
<form action="<? echo $_SERVER['PHP_SELF'] ?>" method="post">
<tr><td colspan="2">
<input type="hidden" name="uid" value="<? echo $user->id ?>">
<input type="hidden" name="action" value="<? echo ($user->active ? "disable" : "enable") ?>">
<input type="submit" value="<? echo ($user->active ? "Disable" : "Enable") ?> Account">
</form>
</td></tr>
<tr><td colspan="2" style="border-bottom: 1px solid #000000;">&nbsp;</td></tr>
<tr><th colspan=2>Groups</th></tr>
<tr><td>
<form action="<? echo $_SERVER['PHP_SELF'] ?>" method="post">
<input type="hidden" name="action" value="addtogroup">
<input type="hidden" name="uid" value="<? echo $user->id ?>">
<select name="group">
<option value="0">-Select A Group-</option>
<?
$groups=getGroupList();
foreach($groups as $val) {
	if(!$user->isInGroup($val['people_group_id'])) {
		echo "
<option value=\"" . $val['people_group_id'] . "\">" . stripslashes($val['people_group_name']) . "
</option>";
	}
}
?>
</select><br />
<input type="submit" value="Add to Group">
</td></form><td>
<form action="<? echo $_SERVER['PHP_SELF'] ?>" method="post">
<input type="hidden" name="action" value="removefromgroup">
<input type="hidden" name="uid" value="<? echo $user->id ?>">
<select name="group">
<option value="0">-Select A Group-</option>
<?
$groups=$user->getGroupList();
foreach($groups as $val) {
	echo "
<option value=\"" . $val['people_group_id'] . "\">" . stripslashes($val['people_group_name']) . "
</option>";
}
?>
</select><br />
<input type="submit" value="Remove from Group"></form>
</td></tr>
<tr><td colspan="2" style="border-bottom: 1px solid #000000;">&nbsp;</td></tr>
<tr><th colspan=2>Page Access</th></tr>
<tr><td colspan="2">
<form action="<? echo $_SERVER['PHP_SELF'] ?>" method="post">
<input type="hidden" name="action" value="changeaccess">
<input type="hidden" name="uid" value="<? echo $user->id ?>">
<select name="page">
<option value="0">-Select A Page-</option>
<?
$access=getPageList();
foreach($access as $val) {
	echo "
<option value=\"" . $val['page_id'] . "\">" . stripslashes(pageId2Name($val['page_id'])) . "</option>";
}
?>
</select>
<select name="access">
<option value="default">Default Access</option>
<option value="0">Cannot Access</option>
<option value="1">Can Access</option>
</select>
<input type="submit" value="Change Access">
</form>
</td></tr>
<tr><td>
<form action="<? echo $_SERVER['PHP_SELF'] ?>" method="get">
<input type="hidden" name="action" value="delete">
<input type="hidden" name="uid" value="<? echo $user->id ?>">
<input type="submit" value="Delete User">
</form>
</td></tr>
</table>

